
import axios from './api' // 倒入 api
import config from './config.js' // 倒入默认配置
export const BASEURL = config.baseURL

/* 将所有接口统一起来便于维护
 * 如果项目很大可以将 url 独立成文件，接口分成不同的模块
 */

export const IMAGEPATH = BASEURL + 'crm'

// 首页-获取业绩排行榜
export const GET_INDEX_INCOMESORT = (params) => {
    return axios({
        url: '/home/income/sort',
        method: 'POST',
        data: params
    })
}

// 首页-获取客户状态统计
export const GET_CUSTOMER_STATE = (params) => {
    return axios({
        url: '/home/customer/state',
        method: 'POST',
        data: params
    })
}

// 首页-获取客户标签统计
export const GET_CUSTOMER_LABEL = (params) => {
    return axios({
        url: '/home/customer/label',
        method: 'POST',
        data: params
    })
}